import { SUP_NUM, OPP_NUM } from './action-type'

const initState = {
	supNum: 0,
	oppNum: 0,
	supPercent: '0'
}

const reducer = (state = initState, action) => {
	state = { ...state }
	switch (action.type) {
		case SUP_NUM:
			state.supNum++
			break
		case OPP_NUM:
			state.oppNum++
			break
	}
	return state
}

export default reducer